﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Private/Privada.master" AutoEventWireup="true"
    CodeBehind="Index.aspx.cs" Inherits="HRP.Private.Mensagens.Index" %>

<%@ Register Src="~/Private/Mensagens/menuMensagens.ascx" TagName="menuMensagens"
    TagPrefix="hrp" %>

<%@ Import Namespace="HRP.Utilidades" %>

<asp:Content ID="Content1" ContentPlaceHolderID="PrivadaMainContent" runat="server">
    <div class="page-heading animated fadeInDownBig">
        <h1>Caixa de Entrada <small></small>
        </h1>
    </div>
    <!-- End page header -->
    <!-- Your awesome content goes here -->
    <div class="box-info box-messages animated fadeInDown">
        <div class="row">
            <hrp:menuMensagens runat="server" ID="menuMensagens"></hrp:menuMensagens>
            <div class="col-md-10">
                <div class="row">
                    <div class="col-sm-9">
                    </div>
                    <div class="col-sm-3">
                        <div class="pull-right">
                            <a href="#" data-toggle="tooltip" title="Refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a>
                            <%-- <span class="paging-status">1</span>
                                <div class="btn-group">
                                    <a class="btn btn-default"><i class="fa fa-chevron-left"></i></a><a class="btn btn-default">
                                        <i class="fa fa-chevron-right"></i></a>
                                </div>--%>
                        </div>
                    </div>

                    <%--         <asp:Repeater runat="server" ID="mensagensTable"  >
                    <HeaderTemplate>
                        <div class="table-responsive">
                            <table class="table table-hover table-message">
                                <thead>
                                    <tr>
                                        <th style="width: 30px" data-sortable="false">
                                            <input type="checkbox" class="rows-check">
                                        </th>
                                        <th>
                                            Nº
                                        </th>
                                        <th>
                                            Email De:
                                        </th>
                                        <th>
                                            Assunto
                                        </th>
                                        <th>
                                            Data
                                        </th>
                                        <th>
                                            Lida
                                        </th>
                                        <th data-sortable="false">
                                            Abrir
                                        </th>
                                    </tr>
                                </thead>
                                <tbody>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <tr>
                            <td>
                                <input type="checkbox" class="rows-check">
                            </td>
                            <td>
                                <%#Eval("id") %>
                            </td>
                            <td>
                                <%#Eval("nome_envia") %>
                            </td>
                            <td>
                                <%#Eval("assunto")%>
                            </td>
                            <td>
                                <%#Eval("data_create")%>
                            </td>
                            <td>
                                <span class="label <%#(bool)Eval("status") ? "label-success" : "label-danger"%> ">
                                    <%#(bool)Eval("status") ? "Sim" : "Não"%></span>
                            </td>
                            <td>
                                <div class="btn-group btn-group-xs">                                   
                                    <a href='ler.aspx?id=<%#Eval("id") %>' data-toggle="tooltip" title="Ver" class="btn btn-default">
                                        <i class="fa fa-eye"></i></a>
                                        
                                </div>
                            </td>
                        </tr>
                    </ItemTemplate>
                    <FooterTemplate>
                        </tbody></table></div></FooterTemplate>
                </asp:Repeater>--%>
                    <div class="col-sm-12">
                        <%if (ListViewMail.Items.Count == 0)
                          { %>

                        <h5>Não tem mensagens.
                        </h5>
                        <%}
                          else
                          { %>
                        <asp:ListView runat="server" ID="ListViewMail">
                            <ItemTemplate>
                                <div class="table-responsive">
                                    <table class="table table-hover table-striped" style="text-align: left">
                                        <td style="text-align: left; width: 25px">
                                            <%#Eval("id") %>
                                        </td>
                                        <td style="text-align: left; width: 170px">
                                            <%#Eval("nome_envia") %>
                                        </td>
                                        <td style="text-align: left; width: 150px">
                                            <%#Eval("assunto")%>
                                        </td>
                                        <td style="text-align: left; width: 150px">
                                            <%#((DateTime)(Eval("data_create"))).ToString(DefinicoesSite.DataFormato + " hh:mm:ss") %>
                                        </td>
                                        <td style="text-align: left; width: 50px">
                                            <span class="label <%#(bool)Eval("status") ? "label-success" : "label-danger"%> ">
                                                <%#(bool)Eval("status") ? "Sim" : "Não"%></span>
                                        </td>
                                        <td style="text-align: left; width: 50px">
                                            <div class="btn-group btn-group-xs">
                                                <a href='ler.aspx?id=<%#Eval("id") %>' data-toggle="tooltip" title="Ver" class="btn btn-default">
                                                    <i class="fa fa-eye"></i></a>
                                            </div>
                                        </td>
                                    </tr>
                        
                                </div>
                            </ItemTemplate>
                            <LayoutTemplate>
                                <table id="Table1" runat="server" style="width: 100%">
                                    <tr id="Tr1" runat="server" style="">
                                        <th id="Th2" runat="server" style="width: 20px">ID
                                        </th>
                                        <th id="Th3" runat="server" style="width: 220px">De:
                                        </th>
                                        <th id="Th4" runat="server" style="width: 200px">Assunto
                                        </th>
                                        <th id="Th5" runat="server" style="width: 200px">Data
                                        </th>
                                        <th id="Th6" runat="server">Lida
                                        </th>
                                        <th id="Th7" runat="server">Ver
                                        </th>
                                    </tr>
                                    <tr id="itemPlaceholderContainer" runat="server">
                                        <td id="itemPlaceholder" runat="server"></td>
                                    </tr>
                                </table>
                                <div style="">
                                </div>
                            </LayoutTemplate>
                        </asp:ListView>
                        <br />
                        <asp:DataPager ID="DataPager1" runat="server" PagedControlID="ListViewMail" PageSize="15">
                            <Fields>
                                <asp:NextPreviousPagerField ButtonType="Button" ShowFirstPageButton="True" ShowLastPageButton="True"
                                    ButtonCssClass="btn btn-success btn-sm" />
                            </Fields>
                        </asp:DataPager>
                        <%} %>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- End of your awesome content -->
</asp:Content>
